/**
 * Copyright (C) 2024-2030 Super BilGen & 超亿时代信息技术股份有限公司.All Rights Reserved.
 */
package cn.com.yang.function;

/**
 * @Model cn.com.yang.function.LamdaExample
 * @Desc  TODO
 * @author yangyijin
 * @since 2025年2月28日-下午2:28:47
 */
public class LamdaExample {
	
	public static int oprate(int a,int b,MyFunction func) {
		return func.apply(a, b);
	}
	
	public static void main(String[] args) {
		int result = oprate(3,6,(x,y)->x+y);
		System.out.println("Result: "+result);//Result: 9
		
		result = oprate(3,6,(x,y)->x*y);
		System.out.println("Result: "+result);//Result: 18
		
		MyFunction mfun = (x,y)->x-y;
		mfun.printMessage(); // This is a default method.
		MyFunction.staticMessage();//This is a static method.
	}
}
